Java Beginner question about String[] args in the main method

Posted by happysoul on Stack Overflow See other posts from Stack Overflow or by happysoul
Published on 2010-05-21T19:57:16Z Indexed on 2010/05/21 20:00 UTC
Read the original article Hit count: 242

Filed under:
|
|

So I just tried excluding String[] args from the main method

It compiled alright !

But JVM is showing an exception

Why did it compile when String[] args HAS to be included every time ?

What is going on here ? Why won't it show a compilation error ?

typing this made me think that may be compiler did not see it as THE main method ..is that so ?

© Stack Overflow or respective owner

Related posts about java

Related posts about beginner